import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
const routes = [{ //首页
		path: '/index',
		name: 'Index',
		component: () => import("@/views/Index"),
	}, {
		path: '/',
		name: 'Admin',
		component: () => import("@/views/Admin"), //首页,谭湛宇

		// 子组件
		children: [{ //主页
				path: '/home',
				name: 'home',
				component: () => import("@/views/Home")

			},{ //主页
				path: '/testMenu',
				name: 'TestMenu',
				component: () => import("@/views/TestMenu"),

			},

			{
				path: '/addDishes',
				name: 'AddDishes',
				component: () => import("@/views/AddDishes")
			},
			{
				path: '/dishesList',
				name: 'DishesList',
				component: () => import("@/views/DishesList")
			},
			{
				path: '/collection',
				name: 'Collection',
				component: () => import("@/views/Collection")
			},
			{
				path: '/ordersList',
				name: 'OrdersList',
				component: () => import("@/views/OrdersList")
			},
			{
				path: '/addDishes',
				name: 'AddDishes',
				component: () => import("@/views/AddDishes")
			},
			{
				path: '/dishesList',
				name: 'DishesList',
				component: () => import("@/views/DishesList")
			},
			{
				path: '/dishesTypeList',
				name: 'DishesTypeList',
				component: () => import("@/views/DishesTypeList.vue")
			},
			{
				path: '/addDishesType',
				name: 'AddDishesType',
				component: () => import("@/views/AddDishesType.vue")
			},
			{
				path: '/ordersList',
				name: 'OrdersList',
				component: () => import("@/views/OrdersList")
			},
			{
				path: '/shop',
				name: 'Shop',
				component: () => import("@/views/Shop")
			},
			{
				path: '/addShop',
				name: 'AddShop',
				component: () => import("@/views/AddShop")
			},
			{
				path: '/auditShop',
				name: 'AuditShop',
				component: () => import("@/views/AuditShop")
			},
			{
				path: '/auditShopInfo',
				name: 'AuditShopInfo',
				component: () => import("@/views/AuditShopInfo")
			},
			{
				path: '/myAssetsList',
				name: 'MyAssetsList',
				component: () => import("@/views/MyAssetsList")
			},
			{
				path: '/shopCasCouponList',
				name: 'ShopCasCouponList',
				component: () => import("@/views/ShopCasCouponList")
			},

		]
	},
	{
		path: '/login',
		name: 'Login',
		component: () => import('../views/Login.vue')
	},
	// {
	// 	path: '/test',
	// 	name: 'test',
	// 	component: () => import('../views/Test.vue')
	// }
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router
